BEGIN;

ALTER TABLE league DROP COLUMN lkey;
DROP TABLE user_role;
CREATE TABLE authority (
	id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
	sid VARCHAR(32) NOT NULL,
	user_id INT(11) NOT NULL,
	authority VARCHAR(30) NOT NULL,
	FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

COMMIT;